<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<style type="text/css">
			li{
				font:30px/50px "微软雅黑";
				background: green;
				margin:10px;
			}
		</style>
		<script src="vue.js"></script>
		
	</head>
	<body>
		<div id="box">
			<input type="button" value="按钮1click" v-on:click='add()' />
			<input type="button" value="按钮2mouseover" v-on:mouseover='add()' />
			<input type="button" value="按钮3mouseout" v-on:mouseout='add()' />
			<input type="button" value="按钮4mousedown" v-on:mousedown='add()' />
			<input type="button" value="按钮5mouseup" v-on:mouseup='add()' />
			<input type="button" value="按钮6dblclick" v-on:dblclick='add()' />
			<hr />
			<ul>
				<li v-for='value in arr'>
					{{value}}
				</li>
			</ul>
		</div>
		<script type="text/javascript">
			new Vue({
				el: '#box',
				data: {
				    arr:['apple','banana','orange','pear']
				},
				methods:{
					add:function(){//方法
						this.arr.push('tomato')
					}
				}
			})
		</script>
	</body>
</html>
